// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from "./store";
import './style/index.css'
import './style/index.scss'
import ElementUI from 'element-ui'; //element 框架
import * as httpConfig from './utils/httpConfig' //工具类    ES6 编译器识别问题
import * as verify from './utils/verify' //工具类    ES6 编译器识别问题
import echarts from 'echarts' //百度echert
import './promission.js'
import 'babel-polyfill' //解决es6语法
import 'element-ui/lib/theme-chalk/index.css'; //element样式
import axios from 'axios';
// 匹配全局化
import {canFunc} from './utils/permission'  //权限
Vue.prototype.$echarts = echarts //使用echarts
Vue.config.productionTip = false //不知道干嘛的
Vue.use(ElementUI); //使用ElementUI
// Vue.use(util); //使用util
Vue.use(httpConfig); //使用util
Vue.use(verify); //使用util
Vue.prototype.axios = axios;
Vue.prototype.$canFunc = canFunc;
Vue.prototype.setCache = function (key, value) { //设置缓存
    localStorage.setItem(key, JSON.stringify(value))
}
Vue.prototype.getCache = function (key) { //获取缓存
    return JSON.parse(localStorage.getItem(key))
}
Vue.prototype.removeCache = function (key) { //删缓存
    localStorage.removeItem(key)
}
/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: {
        App
    },
    template: '<App/>'
})
